gdk: Make GdkDrawingContext not per-backend
authorBenjamin Otte <otte@redhat.com>
Wed, 30 Nov 2016 14:52:22 +0000 (15:52 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 30 Nov 2016 14:52:22 +0000 (15:52 +0100)
No backend is using it, and we can put the backend-specific drawing code
into GdkGLContext.

26 files changed:
gdk/broadway/Makefile.am
gdk/broadway/gdkdrawingcontext-broadway.c [deleted file]
gdk/broadway/gdkdrawingcontext-broadway.h [deleted file]
gdk/broadway/gdkwindow-broadway.c
gdk/gdkwindow.c
gdk/gdkwindowimpl.h
gdk/mir/Makefile.am
gdk/mir/gdkmir-private.h
gdk/mir/gdkmirdrawingcontext.c [deleted file]
gdk/mir/gdkmirwindowimpl.c
gdk/quartz/Makefile.am
gdk/quartz/gdkdrawingcontext-quartz.c [deleted file]
gdk/quartz/gdkdrawingcontext-quartz.h [deleted file]
gdk/quartz/gdkwindow-quartz.c
gdk/wayland/Makefile.am
gdk/wayland/gdkdrawingcontext-wayland.c [deleted file]
gdk/wayland/gdkdrawingcontext-wayland.h [deleted file]
gdk/wayland/gdkwindow-wayland.c
gdk/win32/Makefile.am
gdk/win32/gdkdrawingcontext-win32.c [deleted file]
gdk/win32/gdkdrawingcontext-win32.h [deleted file]
gdk/win32/gdkwindow-win32.c
gdk/x11/Makefile.am
gdk/x11/gdkdrawingcontext-x11.c [deleted file]
gdk/x11/gdkdrawingcontext-x11.h [deleted file]
gdk/x11/gdkwindow-x11.c

index fad502a028f5499a1a0d8967f35cec99310f5ab0..59c181e25790b3291bc90502df50c37c4e3e2d73 100644 (file)
@@ -61,8 +61,6 @@ libgdk_broadway_la_SOURCES =          \
        gdkdisplay-broadway.c   \
        gdkdisplay-broadway.h   \
        gdkdnd-broadway.c       \
-       gdkdrawingcontext-broadway.c    \
-       gdkdrawingcontext-broadway.h    \
        gdkeventsource.c        \
        gdkeventsource.h        \
        gdkglobals-broadway.c   \
diff --git a/gdk/broadway/gdkdrawingcontext-broadway.c b/gdk/broadway/gdkdrawingcontext-broadway.c
deleted file mode 100644 (file)
index ea1ec85..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright 2016  Benjamin Otte <otte@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include "gdkdrawingcontext-broadway.h"
-
-G_DEFINE_TYPE (GdkBroadwayDrawingContext, gdk_broadway_drawing_context, GDK_TYPE_DRAWING_CONTEXT)
-
-static void
-gdk_broadway_drawing_context_class_init (GdkBroadwayDrawingContextClass *klass)
-{
-}
-
-static void
-gdk_broadway_drawing_context_init (GdkBroadwayDrawingContext *self)
-{
-}
-
diff --git a/gdk/broadway/gdkdrawingcontext-broadway.h b/gdk/broadway/gdkdrawingcontext-broadway.h
deleted file mode 100644 (file)
index 03883d8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __GDK_BROADWAY_DRAWING_CONTEXT_H__
-#define __GDK_BROADWAY_DRAWING_CONTEXT_H__
-
-#include "gdk/gdkdrawingcontextprivate.h"
-
-G_BEGIN_DECLS
-
-#define GDK_TYPE_BROADWAY_DRAWING_CONTEXT                (gdk_broadway_drawing_context_get_type ())
-#define GDK_BROADWAY_DRAWING_CONTEXT(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_BROADWAY_DRAWING_CONTEXT, GdkBroadwayDrawingContext))
-#define GDK_IS_BROADWAY_DRAWING_CONTEXT(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_BROADWAY_DRAWING_CONTEXT))
-#define GDK_BROADWAY_DRAWING_CONTEXT_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_DRAWING_CONTEXT, GdkBroadwayDrawingContextClass))
-#define GDK_IS_BROADWAY_DRAWING_CONTEXT_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_DRAWING_CONTEXT))
-#define GDK_BROADWAY_DRAWING_CONTEXT_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_DRAWING_CONTEXT, GdkBroadwayDrawingContextClass))
-
-typedef struct _GdkBroadwayDrawingContext       GdkBroadwayDrawingContext;
-typedef struct _GdkBroadwayDrawingContextClass  GdkBroadwayDrawingContextClass;
-
-struct _GdkBroadwayDrawingContext
-{
-  GdkDrawingContext parent_instance;
-};
-
-struct _GdkBroadwayDrawingContextClass
-{
-  GdkDrawingContextClass parent_instance;
-};
-
-GType gdk_broadway_drawing_context_get_type (void) G_GNUC_CONST;
-
-G_END_DECLS
-
-#endif /* __GDK_BROADWAY_DRAWING_CONTEXT_H__ */
index 1271616bb83e2ae8b1a7fab87715995be25c17f5..5004d4c31bd8580c9d53640dd2055b101bdb1a24 100644 (file)
@@ -33,7 +33,6 @@
 #include "gdkwindow.h"
 #include "gdkwindowimpl.h"
 #include "gdkdisplay-broadway.h"
-#include "gdkdrawingcontext-broadway.h"
 #include "gdkprivate-broadway.h"
 #include "gdkinternals.h"
 #include "gdkdeviceprivate.h"
@@ -1501,16 +1500,6 @@ gdk_broadway_get_last_seen_time (GdkWindow  *window)
   return _gdk_broadway_server_get_last_seen_time (GDK_BROADWAY_DISPLAY (display)->server);
 }
 
-static GdkDrawingContext *
-gdk_broadway_window_create_draw_context (GdkWindow            *window,
-                                        const cairo_region_t *region)
-{
-  return g_object_new (GDK_TYPE_BROADWAY_DRAWING_CONTEXT,
-                       "window", window,
-                       "clip", region,
-                       NULL);
-}
-
 static void
 gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
 {
@@ -1589,5 +1578,4 @@ gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
   impl_class->change_property = _gdk_broadway_window_change_property;
   impl_class->delete_property = _gdk_broadway_window_delete_property;
   impl_class->get_drag_protocol = _gdk_broadway_window_get_drag_protocol;
-  impl_class->create_draw_context = gdk_broadway_window_create_draw_context;
 }
index 2ff89ee8e66eeaa1a84e0b02fa88cd9eb93188cb..9ddec1bf08b95a7aa79fd99bc9c15b62fd9fbf01 100644 (file)
@@ -2911,7 +2911,10 @@ gdk_window_begin_draw_frame (GdkWindow            *window,
 
   gdk_window_begin_paint_internal (window, region);
 
-  context = GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_draw_context (window, region);
+  context = g_object_new (GDK_TYPE_DRAWING_CONTEXT,
+                          "window", window,
+                          "clip", region,
+                          NULL);
 
   /* Do not take a reference, to avoid creating cycles */
   window->drawing_context = context;
index d15b9da1a43b597dc88960b896d44ce0f81ece4a..82f7de984eeed7b1aacd366cded11e2bbb43ed20 100644 (file)
@@ -301,9 +301,6 @@ struct _GdkWindowImplClass
                                            GError        **error);
   void         (*invalidate_for_new_frame)(GdkWindow      *window,
                                            cairo_region_t *update_area);
-
-  GdkDrawingContext *(* create_draw_context)  (GdkWindow            *window,
-                                               const cairo_region_t *region);
 };
 
 /* Interface Functions */
index 87ec55bad35d13741f0439d36c4f47b4e392a9bc..654b8f9bb89f27346d411a0fa4529079937d702f 100644 (file)
@@ -24,7 +24,6 @@ libgdk_mir_la_SOURCES =       \
        gdkmircursor.c \
        gdkmirdevicemanager.c \
        gdkmirdisplay.c \
-       gdkmirdrawingcontext.c \
        gdkmireventsource.c     \
        gdkmirglcontext.c \
        gdkmirkeyboard.c \
index afe7a7c0d3aa172a73728cb5e3f2b23ee73f6c09..69f927fab91c2b6d0afd1a1a3c34e9a8084d3345 100644 (file)
@@ -95,8 +95,6 @@ void _gdk_mir_window_impl_set_cursor_state (GdkMirWindowImpl *impl, gdouble x, g
 
 void _gdk_mir_window_impl_get_cursor_state (GdkMirWindowImpl *impl, gdouble *x, gdouble *y, gboolean *cursor_inside, guint *button_state);
 
-GdkDrawingContext *gdk_mir_drawing_context_new (GdkWindow *window, const cairo_region_t *region);
-
 GdkMirEventSource *_gdk_mir_display_get_event_source (GdkDisplay *display);
 
 GdkMirEventSource *_gdk_mir_event_source_new (GdkDisplay *display);
diff --git a/gdk/mir/gdkmirdrawingcontext.c b/gdk/mir/gdkmirdrawingcontext.c
deleted file mode 100644 (file)
index af82fcd..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright 2016  Benjamin Otte <otte@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-#include "gdk/gdkdrawingcontextprivate.h"
-
-#define GDK_TYPE_MIR_DRAWING_CONTEXT                (gdk_mir_drawing_context_get_type ())
-#define GDK_MIR_DRAWING_CONTEXT(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_MIR_DRAWING_CONTEXT, GdkMirDrawingContext))
-#define GDK_IS_MIR_DRAWING_CONTEXT(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_MIR_DRAWING_CONTEXT))
-#define GDK_MIR_DRAWING_CONTEXT_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_MIR_DRAWING_CONTEXT, GdkMirDrawingContextClass))
-#define GDK_IS_MIR_DRAWING_CONTEXT_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MIR_DRAWING_CONTEXT))
-#define GDK_MIR_DRAWING_CONTEXT_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MIR_DRAWING_CONTEXT, GdkMirDrawingContextClass))
-
-typedef struct _GdkMirDrawingContext       GdkMirDrawingContext;
-typedef struct _GdkMirDrawingContextClass  GdkMirDrawingContextClass;
-
-struct _GdkMirDrawingContext
-{
-  GdkDrawingContext parent_instance;
-};
-
-struct _GdkMirDrawingContextClass
-{
-  GdkDrawingContextClass parent_instance;
-};
-
-GType gdk_mir_drawing_context_get_type (void) G_GNUC_CONST;
-
-G_DEFINE_TYPE (GdkMirDrawingContext, gdk_mir_drawing_context, GDK_TYPE_DRAWING_CONTEXT)
-
-static void
-gdk_mir_drawing_context_class_init (GdkMirDrawingContextClass *klass)
-{
-}
-
-static void
-gdk_mir_drawing_context_init (GdkMirDrawingContext *self)
-{
-}
-
-GdkDrawingContext *
-gdk_mir_drawing_context_new (GdkWindow            *window,
-                             const cairo_region_t *region)
-{
-  return g_object_new (GDK_TYPE_MIR_DRAWING_CONTEXT,
-                       "window", window,
-                       "clip", region,
-                       NULL);
-}
-
index 5e0e1fc21c286d38b978305a46f404a6ed54f0f7..7fc9376699520460764c63cbb3da3e97a57fb817 100644 (file)
@@ -1830,6 +1830,5 @@ gdk_mir_window_impl_class_init (GdkMirWindowImplClass *klass)
   impl_class->set_opaque_region = gdk_mir_window_impl_set_opaque_region;
   impl_class->set_shadow_width = gdk_mir_window_impl_set_shadow_width;
   impl_class->create_gl_context = gdk_mir_window_impl_create_gl_context;
-  impl_class->create_draw_context = gdk_mir_drawing_context_new;
   impl_class->invalidate_for_new_frame = gdk_mir_window_impl_invalidate_for_new_frame;
 }
index ba5e8d20fd787afeae546ded4aeb2a3dde6402de..eda5263f72fde998bf3fa2d3844fd6a3aadcc1bb 100644 (file)
@@ -30,8 +30,6 @@ libgdk_quartz_la_SOURCES =            \
        gdkdevicemanager-core-quartz.h  \
        gdkdisplay-quartz.c     \
        gdkdisplaymanager-quartz.c      \
-       gdkdrawingcontext-quartz.c      \
-       gdkdrawingcontext-quartz.h      \
        gdkdnd-quartz.c         \
        gdkdnd-quartz.h         \
        gdkevents-quartz.c      \
diff --git a/gdk/quartz/gdkdrawingcontext-quartz.c b/gdk/quartz/gdkdrawingcontext-quartz.c
deleted file mode 100644 (file)
index 1e30ed7..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright 2016  Benjamin Otte <otte@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include "gdkdrawingcontext-quartz.h"
-
-G_DEFINE_TYPE (GdkQuartzDrawingContext, gdk_quartz_drawing_context, GDK_TYPE_DRAWING_CONTEXT)
-
-static void
-gdk_quartz_drawing_context_class_init (GdkQuartzDrawingContextClass *klass)
-{
-}
-
-static void
-gdk_quartz_drawing_context_init (GdkQuartzDrawingContext *self)
-{
-}
-
diff --git a/gdk/quartz/gdkdrawingcontext-quartz.h b/gdk/quartz/gdkdrawingcontext-quartz.h
deleted file mode 100644 (file)
index 55c9d69..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __GDK_QUARTZ_DRAWING_CONTEXT_H__
-#define __GDK_QUARTZ_DRAWING_CONTEXT_H__
-
-#include "gdk/gdkdrawingcontextprivate.h"
-
-G_BEGIN_DECLS
-
-#define GDK_TYPE_QUARTZ_DRAWING_CONTEXT                (gdk_quartz_drawing_context_get_type ())
-#define GDK_QUARTZ_DRAWING_CONTEXT(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_QUARTZ_DRAWING_CONTEXT, GdkQuartzDrawingContext))
-#define GDK_IS_QUARTZ_DRAWING_CONTEXT(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_QUARTZ_DRAWING_CONTEXT))
-#define GDK_QUARTZ_DRAWING_CONTEXT_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_DRAWING_CONTEXT, GdkQuartzDrawingContextClass))
-#define GDK_IS_QUARTZ_DRAWING_CONTEXT_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_DRAWING_CONTEXT))
-#define GDK_QUARTZ_DRAWING_CONTEXT_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_DRAWING_CONTEXT, GdkQuartzDrawingContextClass))
-
-typedef struct _GdkQuartzDrawingContext       GdkQuartzDrawingContext;
-typedef struct _GdkQuartzDrawingContextClass  GdkQuartzDrawingContextClass;
-
-struct _GdkQuartzDrawingContext
-{
-  GdkDrawingContext parent_instance;
-};
-
-struct _GdkQuartzDrawingContextClass
-{
-  GdkDrawingContextClass parent_instance;
-};
-
-GType gdk_quartz_drawing_context_get_type (void) G_GNUC_CONST;
-
-G_END_DECLS
-
-#endif /* __GDK_QUARTZ_DRAWING_CONTEXT_H__ */
index ae2ca22959e0cc1c96832a061e94c92474a6ca5b..3f68c68020ff38d3747bfbb0a5d7d849eafc412b 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "gdkwindowimpl.h"
 #include "gdkprivate-quartz.h"
-#include "gdkdrawingcontext-quartz.h"
 #include "gdkglcontext-quartz.h"
 #include "gdkquartzscreen.h"
 #include "gdkquartzcursor.h"
@@ -2788,16 +2787,6 @@ gdk_quartz_window_get_scale_factor (GdkWindow *window)
   return 1;
 }
 
-static GdkDrawingContext *
-gdk_quartz_window_create_draw_context (GdkWindow            *window,
-                                       const cairo_region_t *region)
-{
-  return g_object_new (GDK_TYPE_QUARTZ_DRAWING_CONTEXT,
-                       "window", window,
-                       "clip", region,
-                       NULL);
-}
-
 static void
 gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
 {
@@ -2882,7 +2871,6 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
   impl_class->delete_property = _gdk_quartz_window_delete_property;
 
   impl_class->create_gl_context = gdk_quartz_window_create_gl_context;
-  impl_class->create_draw_context = gdk_quartz_window_create_draw_context;
 
   impl_quartz_class->get_context = gdk_window_impl_quartz_get_context;
   impl_quartz_class->release_context = gdk_window_impl_quartz_release_context;
index c40e24fc51b67ced0d80c5be59e7b531217b46a1..127e091b00f5689c353359facff0db11a2e89bc5 100644 (file)
@@ -46,8 +46,6 @@ libgdk_wayland_la_SOURCES =                   \
        gdkdevice-wayland.c                     \
        gdkdisplay-wayland.c                    \
        gdkdisplay-wayland.h                    \
-       gdkdrawingcontext-wayland.c             \
-       gdkdrawingcontext-wayland.h             \
        gdkdnd-wayland.c                        \
        gdkeventsource.c                        \
        gdkkeys-wayland.c                       \
diff --git a/gdk/wayland/gdkdrawingcontext-wayland.c b/gdk/wayland/gdkdrawingcontext-wayland.c
deleted file mode 100644 (file)
index 927e569..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright 2016  Benjamin Otte <otte@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include "gdkdrawingcontext-wayland.h"
-
-G_DEFINE_TYPE (GdkWaylandDrawingContext, gdk_wayland_drawing_context, GDK_TYPE_DRAWING_CONTEXT)
-
-static void
-gdk_wayland_drawing_context_class_init (GdkWaylandDrawingContextClass *klass)
-{
-}
-
-static void
-gdk_wayland_drawing_context_init (GdkWaylandDrawingContext *self)
-{
-}
-
diff --git a/gdk/wayland/gdkdrawingcontext-wayland.h b/gdk/wayland/gdkdrawingcontext-wayland.h
deleted file mode 100644 (file)
index 2577f74..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __GDK_WAYLAND_DRAWING_CONTEXT_H__
-#define __GDK_WAYLAND_DRAWING_CONTEXT_H__
-
-#include "gdk/gdkdrawingcontextprivate.h"
-
-G_BEGIN_DECLS
-
-#define GDK_TYPE_WAYLAND_DRAWING_CONTEXT                (gdk_wayland_drawing_context_get_type ())
-#define GDK_WAYLAND_DRAWING_CONTEXT(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_WAYLAND_DRAWING_CONTEXT, GdkWaylandDrawingContext))
-#define GDK_IS_WAYLAND_DRAWING_CONTEXT(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_WAYLAND_DRAWING_CONTEXT))
-#define GDK_WAYLAND_DRAWING_CONTEXT_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WAYLAND_DRAWING_CONTEXT, GdkWaylandDrawingContextClass))
-#define GDK_IS_WAYLAND_DRAWING_CONTEXT_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WAYLAND_DRAWING_CONTEXT))
-#define GDK_WAYLAND_DRAWING_CONTEXT_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WAYLAND_DRAWING_CONTEXT, GdkWaylandDrawingContextClass))
-
-typedef struct _GdkWaylandDrawingContext       GdkWaylandDrawingContext;
-typedef struct _GdkWaylandDrawingContextClass  GdkWaylandDrawingContextClass;
-
-struct _GdkWaylandDrawingContext
-{
-  GdkDrawingContext parent_instance;
-};
-
-struct _GdkWaylandDrawingContextClass
-{
-  GdkDrawingContextClass parent_instance;
-};
-
-GType gdk_wayland_drawing_context_get_type (void) G_GNUC_CONST;
-
-G_END_DECLS
-
-#endif /* __GDK_WAYLAND_DRAWING_CONTEXT_H__ */
index 5360c4b8272218fb75b9af5a82d9bf88064cc9fe..e8db78bad92cc6ab50221cdeeced725dad0b4065 100644 (file)
@@ -26,7 +26,6 @@
 #include "gdkwindow.h"
 #include "gdkwindowimpl.h"
 #include "gdkdisplay-wayland.h"
-#include "gdkdrawingcontext-wayland.h"
 #include "gdkglcontext-wayland.h"
 #include "gdkframeclockprivate.h"
 #include "gdkprivate-wayland.h"
@@ -3568,16 +3567,6 @@ gdk_wayland_window_show_window_menu (GdkWindow *window,
   return TRUE;
 }
 
-static GdkDrawingContext *
-gdk_wayland_window_create_draw_context (GdkWindow            *window,
-                                        const cairo_region_t *region)
-{
-  return g_object_new (GDK_TYPE_WAYLAND_DRAWING_CONTEXT,
-                       "window", window,
-                       "clip", region,
-                       NULL);
-}
-
 static void
 _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
 {
@@ -3665,7 +3654,6 @@ _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
   impl_class->set_shadow_width = gdk_wayland_window_set_shadow_width;
   impl_class->show_window_menu = gdk_wayland_window_show_window_menu;
   impl_class->create_gl_context = gdk_wayland_window_create_gl_context;
-  impl_class->create_draw_context = gdk_wayland_window_create_draw_context;
   impl_class->invalidate_for_new_frame = gdk_wayland_window_invalidate_for_new_frame;
 
   signals[COMMITTED] = g_signal_new ("committed",
index eb76bbcf5a103bfb33540c64b8e2fbbdcf1ec686..ebd4ae6f9fa99c77b947928798c1b9e0cec8534b 100644 (file)
@@ -40,8 +40,6 @@ libgdk_win32_la_SOURCES = \
        gdkdisplay-win32.c \
        gdkdisplay-win32.h \
        gdkdisplaymanager-win32.c \
-       gdkdrawingcontext-win32.c \
-       gdkdrawingcontext-win32.h \
        gdkdnd-win32.c \
        gdkevents-win32.c \
        gdkgeometry-win32.c \
diff --git a/gdk/win32/gdkdrawingcontext-win32.c b/gdk/win32/gdkdrawingcontext-win32.c
deleted file mode 100644 (file)
index 6938422..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright 2016  Benjamin Otte <otte@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include "gdkdrawingcontext-win32.h"
-
-G_DEFINE_TYPE (GdkWin32DrawingContext, gdk_win32_drawing_context, GDK_TYPE_DRAWING_CONTEXT)
-
-static void
-gdk_win32_drawing_context_class_init (GdkWin32DrawingContextClass *klass)
-{
-}
-
-static void
-gdk_win32_drawing_context_init (GdkWin32DrawingContext *self)
-{
-}
-
diff --git a/gdk/win32/gdkdrawingcontext-win32.h b/gdk/win32/gdkdrawingcontext-win32.h
deleted file mode 100644 (file)
index fe6fa45..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __GDK_WIN32_DRAWING_CONTEXT_H__
-#define __GDK_WIN32_DRAWING_CONTEXT_H__
-
-#include "gdk/gdkdrawingcontextprivate.h"
-
-G_BEGIN_DECLS
-
-#define GDK_TYPE_WIN32_DRAWING_CONTEXT                (gdk_win32_drawing_context_get_type ())
-#define GDK_WIN32_DRAWING_CONTEXT(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_WIN32_DRAWING_CONTEXT, GdkWin32DrawingContext))
-#define GDK_IS_WIN32_DRAWING_CONTEXT(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_WIN32_DRAWING_CONTEXT))
-#define GDK_WIN32_DRAWING_CONTEXT_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WIN32_DRAWING_CONTEXT, GdkWin32DrawingContextClass))
-#define GDK_IS_WIN32_DRAWING_CONTEXT_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WIN32_DRAWING_CONTEXT))
-#define GDK_WIN32_DRAWING_CONTEXT_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WIN32_DRAWING_CONTEXT, GdkWin32DrawingContextClass))
-
-typedef struct _GdkWin32DrawingContext       GdkWin32DrawingContext;
-typedef struct _GdkWin32DrawingContextClass  GdkWin32DrawingContextClass;
-
-struct _GdkWin32DrawingContext
-{
-  GdkDrawingContext parent_instance;
-};
-
-struct _GdkWin32DrawingContextClass
-{
-  GdkDrawingContextClass parent_instance;
-};
-
-GType gdk_win32_drawing_context_get_type (void) G_GNUC_CONST;
-
-G_END_DECLS
-
-#endif /* __GDK_WIN32_DRAWING_CONTEXT_H__ */
index f5c4be4cc1426c4b6be6b4b6e8938743f0f9ad3c..cddd9ef1b551ddb1f68088ecc74c7e9485d42034 100644 (file)
@@ -41,7 +41,6 @@
 #include "gdkwin32window.h"
 #include "gdkglcontext-win32.h"
 #include "gdkdisplay-win32.h"
-#include "gdkdrawingcontext-win32.h"
 
 #include <cairo-win32.h>
 #include <dwmapi.h>
@@ -6026,16 +6025,6 @@ _gdk_win32_window_get_unscaled_size (GdkWindow *window,
     *unscaled_height = impl->unscaled_height;
 }
 
-static GdkDrawingContext *
-gdk_win32_window_create_draw_context (GdkWindow            *window,
-                                      const cairo_region_t *region)
-{
-  return g_object_new (GDK_TYPE_WIN32_DRAWING_CONTEXT,
-                       "window", window,
-                       "clip", region,
-                       NULL);
-}
-
 static void
 gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass)
 {
@@ -6125,7 +6114,6 @@ gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass)
   impl_class->change_property = _gdk_win32_window_change_property;
   impl_class->delete_property = _gdk_win32_window_delete_property;
   impl_class->create_gl_context = _gdk_win32_window_create_gl_context;
-  impl_class->create_draw_context = gdk_win32_window_create_draw_context;
   impl_class->invalidate_for_new_frame = _gdk_win32_window_invalidate_for_new_frame;
   impl_class->get_scale_factor = _gdk_win32_window_get_scale_factor;
   impl_class->get_unscaled_size = _gdk_win32_window_get_unscaled_size;
index cd4d0e0a830490d9f5dd212c2aadd6e67c7abc93..c23352091a337f999b800cbbef98d753b10180a7 100644 (file)
@@ -35,8 +35,6 @@ libgdk_x11_la_SOURCES =       \
        gdkdisplay-x11.c        \
        gdkdisplay-x11.h        \
        gdkdnd-x11.c            \
-       gdkdrawingcontext-x11.c \
-       gdkdrawingcontext-x11.h \
        gdkeventsource.c        \
        gdkeventsource.h        \
        gdkeventtranslator.c    \
diff --git a/gdk/x11/gdkdrawingcontext-x11.c b/gdk/x11/gdkdrawingcontext-x11.c
deleted file mode 100644 (file)
index 6941124..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright 2016  Benjamin Otte <otte@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include "gdkdrawingcontext-x11.h"
-
-G_DEFINE_TYPE (GdkX11DrawingContext, gdk_x11_drawing_context, GDK_TYPE_DRAWING_CONTEXT)
-
-static void
-gdk_x11_drawing_context_class_init (GdkX11DrawingContextClass *klass)
-{
-}
-
-static void
-gdk_x11_drawing_context_init (GdkX11DrawingContext *self)
-{
-}
-
diff --git a/gdk/x11/gdkdrawingcontext-x11.h b/gdk/x11/gdkdrawingcontext-x11.h
deleted file mode 100644 (file)
index e2858fc..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __GDK_X11_DRAWING_CONTEXT_H__
-#define __GDK_X11_DRAWING_CONTEXT_H__
-
-#include "gdk/gdkdrawingcontextprivate.h"
-
-G_BEGIN_DECLS
-
-#define GDK_TYPE_X11_DRAWING_CONTEXT                (gdk_x11_drawing_context_get_type ())
-#define GDK_X11_DRAWING_CONTEXT(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_X11_DRAWING_CONTEXT, GdkX11DrawingContext))
-#define GDK_IS_X11_DRAWING_CONTEXT(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_X11_DRAWING_CONTEXT))
-#define GDK_X11_DRAWING_CONTEXT_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_X11_DRAWING_CONTEXT, GdkX11DrawingContextClass))
-#define GDK_IS_X11_DRAWING_CONTEXT_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_X11_DRAWING_CONTEXT))
-#define GDK_X11_DRAWING_CONTEXT_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_X11_DRAWING_CONTEXT, GdkX11DrawingContextClass))
-
-typedef struct _GdkX11DrawingContext       GdkX11DrawingContext;
-typedef struct _GdkX11DrawingContextClass  GdkX11DrawingContextClass;
-
-struct _GdkX11DrawingContext
-{
-  GdkDrawingContext parent_instance;
-};
-
-struct _GdkX11DrawingContextClass
-{
-  GdkDrawingContextClass parent_instance;
-};
-
-GType gdk_x11_drawing_context_get_type (void) G_GNUC_CONST;
-
-G_END_DECLS
-
-#endif /* __GDK_X11_DRAWING_CONTEXT_H__ */
index 204e5620ffa4ef4dc30b88ea6745fee0c52e60f6..09de9b245fa120d6f2767b8de2e15600f323d6bc 100644 (file)
@@ -36,7 +36,6 @@
 #include "gdkasync.h"
 #include "gdkeventsource.h"
 #include "gdkdisplay-x11.h"
-#include "gdkdrawingcontext-x11.h"
 #include "gdkglcontext-x11.h"
 #include "gdkprivate-x11.h"
 #include "gdk-private.h"
@@ -211,16 +210,6 @@ gdk_x11_window_get_unscaled_size (GdkWindow *window,
     *unscaled_height = impl->unscaled_height;
 }
 
-static GdkDrawingContext *
-gdk_x11_window_create_draw_context (GdkWindow            *window,
-                                    const cairo_region_t *region)
-{
-  return g_object_new (GDK_TYPE_X11_DRAWING_CONTEXT,
-                       "window", window,
-                       "clip", region,
-                       NULL);
-}
-
 static void
 set_sync_counter(Display     *display,
                 XSyncCounter counter,
@@ -5405,6 +5394,5 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
   impl_class->show_window_menu = gdk_x11_window_show_window_menu;
   impl_class->create_gl_context = gdk_x11_window_create_gl_context;
   impl_class->invalidate_for_new_frame = gdk_x11_window_invalidate_for_new_frame;
-  impl_class->create_draw_context = gdk_x11_window_create_draw_context;
   impl_class->get_unscaled_size = gdk_x11_window_get_unscaled_size;
 }